package com.retail.lottery.colalottery.controller;

import com.retail.lottery.colalottery.annotation.CheckHeader;
import com.retail.lottery.colalottery.annotation.EncryptResponse;
import com.retail.lottery.colalottery.service.ColaLotteryParamService;
import com.retail.lottery.colalottery.service.EffectiveGoodsService;
import com.retail.lottery.colalottery.service.WechatCustomerService;
import com.retail.lottery.colalottery.vo.ResultVO;
import com.retail.lottery.colalottery.vo.request.ColaParamRequest;
import com.retail.lottery.colalottery.vo.request.SaveUserInfoRequest;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/cola-activity")
@Slf4j
public class ColaActivityController {

    @Resource
    private ColaLotteryParamService colaLotteryParamService;

    @Resource
    private EffectiveGoodsService effectiveGoodsService;

    @EncryptResponse
    //@DecryptResponse
    @RequestMapping("/queryColaParam")
    public ResultVO<?> queryColaParam(@Validated @RequestBody ColaParamRequest request){
        return ResultVO.succ(colaLotteryParamService.queryColaParam(request));
    }

    @RequestMapping("/addColaParam")
    public ResultVO<?> addColaParam(@Validated @RequestBody ColaParamRequest request){
        return ResultVO.succ(colaLotteryParamService.addColaParam(request));
    }

//    @RequestMapping("/getEffectiveGoods")
//    public ResultVO<?> getEffectiveGoods(@Validated @RequestBody ColaParamRequest request){
//        return ResultVO.succ(effectiveGoodsService.getEffectiveGoods(request));
//    }
}
